Skip to content

[pull] master from DataDog:master - #450

Merged
pull[bot] merged 3 commits into
ConnectionMaster:masterfrom
DataDog:master
Mar 27, 2026
Merged

[pull] master from DataDog:master#450
pull[bot] merged 3 commits into
ConnectionMaster:masterfrom
DataDog:master

Conversation

@pull

@pull pull Bot commented Mar 27, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

pierreln-dd and others added 3 commits March 27, 2026 14:56
… database has no tables (#22880)

* Fix schema collector silently dropping payloads when last database has no tables

When the last database in the iteration order returns 0 rows from the
schema query, the while loop is skipped and maybe_flush(is_last_payload=True)
is never called. This causes all previously queued rows to be silently
dropped — tables_count reflects the work done but payloads_count stays 0
and no metadata is submitted to the backend.

This affects all DBMS implementations (SQL Server, Postgres, MySQL, Mongo)
that use the shared SchemaCollector base class.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add changelog entry for schema collector flush fix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Shorten comment on flush fix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Simplify flush logic: separate final flush from per-row loop

Instead of detecting is_last_payload inside the while loop (which fails
when the last database returns 0 rows), the loop now only flushes on
chunk size. The final flush always happens after the loop completes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Restore original comments in schema collector loop

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix final payload missing collection_payloads_count when chunk-size flushes drain the queue

When payload_chunk_size is small enough to flush all rows during the loop,
the post-loop flush must still send a final payload with collection_payloads_count
so the backend knows the snapshot is complete.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Simplify fix: move is_last_payload out of while loop

Instead of a separate post-loop flush, move the is_last_payload
check and maybe_flush call outside the while loop but inside
the for-database loop. This handles empty last databases without
the potential empty payload issue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* disk-integration-doc-typo-fix

* Update disk/README.md

Co-authored-by: Esther Kim <esther.kim@datadoghq.com>

---------

Co-authored-by: Esther Kim <esther.kim@datadoghq.com>
@pull pull Bot locked and limited conversation to collaborators Mar 27, 2026
@pull pull Bot added the ⤵️ pull label Mar 27, 2026
@pull
pull Bot merged commit 48bff03 into ConnectionMaster:master Mar 27, 2026
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants